Communication Device

ABSTRACT

A communication device may include a first type of interface and a second type of interface. The communication device may execute the communication of object data with a mobile device using the second type of interface after executing a specific process for causing the communication device to shift to a communication-enabled state, in a case where it is determined that the communication device is not currently in the communication-enabled state. Also, the communication device may execute the communication of the object data with the mobile device using the second type of interface without executing the specific process, in a case where it is determined that the communication device is currently in the communication-enabled state.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of prior U.S. application Ser. No.17/318,630, filed on May 12, 2021, which is a continuation of prior U.S.application Ser. No. 16/884,953, filed on May 27, 2020 now U.S. Pat. No.11,012,843 B2, issued May 18, 2021, which is a continuation of priorU.S. application Ser. No. 16/560,686, filed Sep. 4, 2019, now U.S. Pat.No. 10,674,341 B2, issued Jun. 2, 2020, which is a continuation of priorU.S. application Ser. No. 16/165,731, filed Oct. 19, 2018, now U.S. Pat.No. 10,492,051 B2, issued Nov. 26, 2019, which is a continuation ofprior U.S. application Ser. No. 15/473,130, filed Mar. 29, 2017, nowU.S. Pat. No. 10,123,193 B2, issued Nov. 6, 2018, which is acontinuation of prior U.S. application Ser. No. 14/789,644, filed Jul.1, 2015, now U.S. Pat. No. 9,973,914 B2, issued May 15, 2018, which is acontinuation of prior U.S. application Ser. No. 13/832,035, filed Mar.15, 2013, now U.S. Pat. No. 9,100,774 B2, issued Aug. 4, 2015, whichclaims priority to Japanese Patent Application No. 2012-082817, filed onMar. 30, 2012, the contents of which are hereby incorporated byreference into the present application.

TECHNICAL FIELD

A technique disclosed in the present specification relates to acommunication device for executing communication of object data with amobile device.

DESCRIPTION OF RELATED ART

A technique for two communication devices to execute wirelesscommunication is known. The two communication devices executecommunication of a wireless setting according to a short-range wirelesscommunication system (i.e., a wireless communication according to NFC(abbreviation of: Near Field Communication)). The wireless setting is asetting for executing wireless communication according to acommunication system different from the NFC system (e.g., IEEE 802.11a,802.11b). Thereby, the two communication devices become capable ofexecuting wireless communication according to the wireless setting.

SUMMARY

The present specification discloses a technique for a communicationdevice to appropriately execute communication with a mobile device.

A technique disclosed herein is a communication device. Thecommunication device may comprise a first type of interface forexecuting a communication with a portable terminal and a second type ofinterface for executing a communication with the mobile device. Thecommunication device may comprise one or more processors and a memorythat stores computer-readable instructions therein. Thecomputer-readable instructions, when executed by the one or moreprocessors, may cause the communication device to execute (A) receivingspecific information from the mobile device using the first type ofinterface, (B) determining, using the specific information, whether ornot the communication device is currently in a communication-enabledstate in which the communication device is currently capable ofexecuting a communication of object data with the mobile device usingthe second type of interface, (C) executing the communication of theobject data with the mobile device using the second type of interfaceafter executing a specific process for causing the communication deviceto shift to the communication-enabled state, in a case where it isdetermined that the communication device is not currently in thecommunication-enabled state and (D) executing the communication of theobject data with the mobile device using the second type of interfacewithout executing the specific process, in a case where it is determinedthat the communication device is currently in the communication-enabledstate.

Moreover, a control method, a computer program, and a non-transitorycomputer-readable storage medium computer-readable instructions for thecommunication device, are also novel and useful. Further, acommunication system including the communication device and the mobiledevice are also novel and useful.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 shows the configuration of a communication system.

FIG. 2 shows a flowchart of a communication process executed by amulti-function peripheral of a first embodiment.

FIG. 3 shows a sequence view for explaining processes executed bydevices in a first situation.

FIG. 4 shows a sequence view for explaining processes executed bydevices in a second situation.

FIG. 5 shows a sequence view for explaining processes executed bydevices in a third situation.

FIG. 6 shows a sequence view for explaining processes executed bydevices in a fourth situation.

FIG. 7 shows a sequence view for explaining processes executed bydevices in a fifth situation.

FIG. 8 shows a flowchart of a communication process executed by amulti-function peripheral of a second embodiment.

FIG. 9 shows a sequence view for explaining processes executed bydevices in a sixth situation.

FIG. 10 shows a sequence view for explaining processes executed bydevices in a seventh situation.

FIG. 11 shows a flowchart of a communication process executed by amulti-function peripheral of a third embodiment.

FIG. 12 shows a sequence view for explaining processes executed bydevices in an eighth situation.

FIG. 13 shows a sequence view for explaining processes executed bydevices in a ninth situation.

FIG. 14 shows a flowchart of a communication process executed by amulti-function peripheral of a fourth embodiment.

FIG. 15 shows a sequence view for explaining processes executed bydevices in a tenth situation.

FIG. 16 shows a sequence view for explaining processes executed bydevices in an eleventh situation.

FIG. 17 shows a flowchart of a communication process executed by amulti-function peripheral of a fifth embodiment.

FIG. 18 shows a sequence view for explaining processes executed bydevices in a twelfth situation.

FIG. 19 shows a flowchart of a communication process executed by amulti-function peripheral of a sixth embodiment.

FIG. 20 shows a flowchart of a communication process executed by amulti-function peripheral of a seventh embodiment.

FIG. 21 shows a sequence view for explaining processes executed bydevices in the seventh embodiment.

EMBODIMENT First Embodiment (Configuration of Communication System)

As shown in FIG. 1 , a communication system 2 comprises a multi-functionperipheral (called “MFP” (abbreviation of: Multi-Function Peripheral)below) 10, a mobile device 50, an access point (called “AP” below) 6,and a PC 8. The MFP 10 and the mobile device 50 are capable of executingshort-range wireless communication. The short-range wirelesscommunication is according to the wireless communication NFC system. Inthe present embodiment, the wireless communication is executed accordingto the NFC system based on international standards ISO/IEC 21481 or18092.

Further, the MFP 10 is capable of executing wireless communicationaccording to the Wi-Fi Direct system (to be described). Below, Wi-FiDirect is called “WFD”. In WFD, wireless communication is executed basedon IEEE (abbreviation of: The Institute of Electrical and ElectronicsEngineers, Inc.) 802.11 standard and standards based on thereon (e.g.,802.11a, 11b, 11g, 11n, etc.). The NFC system and the system of WFD(called “WFD system” below) have different wireless communicationsystems (i.e., wireless communication standards). Further, thecommunication speed of wireless communication according to the WFDsystem is faster than the communication speed of wireless communicationaccording to the NFC system.

For example, the MFP 10 can construct a WFD network by establishing aconnection with the mobile device 50 according to the WFD system (called“WFD connection” below). Similarly, the MFP 10 can construct a WFDnetwork by establishing a WFD connection with the PC 8.

The PC 8, the MFP 10 and the mobile device 50 are further capable ofexecuting wireless communication according to a normal Wi-Fi system(e.g., IEEE 802.11) different from the WFD system. In general terms,wireless communication according to normal Wi-Fi is wirelesscommunication using the AP 6, and wireless communication according tothe WFD system is wireless communication not using the AP 6. Forexample, the MFP 10 can belong to a normal Wi-Fi network by establishinga connection with the AP 6 (called “normal Wi-Fi connection” below)according to normal Wi-Fi. Via the AP 6, the MFP 10 can execute wirelesscommunication with another device belonging to the normal Wi-Fi network(e.g., the PC 8, the mobile device 50). Moreover, the NFC system and thesystem of normal Wi-Fi (called “the normal Wi-Fi system” below) havedifferent wireless communication systems (i.e., wireless communicationstandards). Further, the communication speed of normal Wi-Fi is fasterthan the communication speed of NFC.

(WFD)

WFD is a standard formulated by Wi-Fi Alliance. WFD is described in“Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.1”, createdby Wi-Fi Alliance.

As described above, the PC 8, the MFP 10, and the mobile device 50 areeach capable of executing wireless communication according to the WFDsystem. Below, an apparatus capable of executing wireless communicationaccording to the WFD system is called a “WFD-compatible apparatus”.According to the WFD standard, three states are defined as the states ofthe WFD-compatible apparatus: Group Owner state (called “G/O state”below), client state, and device state. The WFD-compatible apparatus iscapable of selectively operating in one state among the three states.

One WFD network includes an apparatus in the G/O state and an apparatusin the client state. Only one G/O state apparatus can be present in theWFD network, but one or more client state apparatuses can be present.The G/O state apparatus manages the one or more client stateapparatuses. Specifically, the G/O state apparatus creates anadministration list in which identification information (i.e., MACaddress) of each of the one or more client state apparatuses is written.When a client state apparatus newly belongs to the WFD network, the G/Ostate apparatus adds the identification information of that apparatus tothe administration list, and when the client state apparatus leaves theWFD network, the G/O state apparatus deletes the identificationinformation of that apparatus from the administration list.

The G/O state apparatus is capable of wirelessly communicating objectdata (e.g., data that includes network layer information of the OSIreference model (print data, scan data, etc.)) with an apparatusregistered in the administration list, i.e., with a client stateapparatus (i.e., an apparatus belonging to the WFD network). However,with an unregistered apparatus which is not registered in theadministration list, the G/O state apparatus is capable of wirelesslycommunicating data for the unregistered apparatus to belong to the WFDnetwork (e.g., data that does not include network layer information(physical layer data such as a Probe Request signal, Probe Responsesignal, etc.)), but is not capable of wirelessly communicating theobject data. For example, the MFP 10 that is in the G/O state is capableof wirelessly receiving print data from the mobile device 50 that isregistered in the administration list (i.e., the mobile device 50 thatis in the client state), but is not capable of wirelessly receivingprint data from an apparatus that is not registered in theadministration list.

Further, the G/O state apparatus is capable of relaying the wirelesscommunication of object data (print data, scan data, etc.) between aplurality of client state apparatuses. For example, in a case where themobile device 50 that is in the client state is to wirelessly send printdata to another printer that is in the client state, the mobile device50 first wirelessly sends the print data to the MFP 10 that is in theG/O state. In this case, the MFP 10 wirelessly receives the print datafrom the mobile device 50, and wirelessly sends the print data to theother printer. That is, the G/O state apparatus is capable of executingthe function of an AP of the normal wireless network.

Moreover, a WFD-compatible apparatus that does not belong to the WFDnetwork (i.e., an apparatus not registered in the administration list)is a device state apparatus. The device state apparatus is capable ofwirelessly communicating data for belonging to the WFD network (physicallayer data such as a Probe Request signal, Probe Response signal, etc.),but is not capable of wirelessly communicating object data (print data,scan data, etc.) via the WFD network.

Moreover, below, an apparatus that is not capable of executing wirelesscommunication according to the WFD system, but is capable of executingwireless communication according to normal Wi-Fi is called a“WFD-incompatible apparatus”. The “WFD-incompatible apparatus” may alsobe called a “legacy apparatus”. A WFD-incompatible apparatus cannotoperate in the G/O state. A G/O state apparatus can registeridentification information of the WFD-incompatible apparatus in theadministration list.

(Configuration of MFP 10)

The MFP 10 comprises an operating unit 12, a displaying unit 14, a printexecuting unit 16, a scan executing unit 18, a wireless LAN interface(an “interface” is called “I/F” below) 20, an NFC I/F 22, and a controlunit 30. The operating unit 12 consists of a plurality of keys. A usercan input various instructions to the MFP 10 by operating the operatingunit 12. The displaying unit 14 is a display for displaying varioustypes of information. The print executing unit 16 is an ink jet system,laser system, etc. printing mechanism. The scan executing unit 18 is aCCD, CIS, etc. scanning mechanism.

The wireless LAN I/F 20 is an interface for the control unit 30 toexecute wireless communication according to the WFD system and wirelesscommunication according to normal Wi-Fi. The wireless LAN I/F 20 isphysically one interface. However, a MAC address used in wirelesscommunication according to the WFD system (called “MAC address for WFD”below) and a MAC address used in wireless communication according tonormal Wi-Fi (called “MAC address for normal Wi-Fi” below) are bothassigned to the wireless LAN I/F 20. More specifically, the MAC addressfor the normal Wi-Fi is pre-assigned to the wireless LAN I/F 20. Usingthe MAC address for the normal Wi-Fi, the control unit 30 creates theMAC address for WFD, and assigns the MAC address for WFD to the wirelessLAN I/F 20. The MAC address for WFD differs from the MAC address for thenormal Wi-Fi. Consequently, via the wireless LAN I/F 20, the controlunit 30 can simultaneously execute both wireless communication accordingto the WFD system and wireless communication according to the normalWi-Fi. Consequently, a situation can be established in which the MFP 10belongs to the WFD network and belongs to the normal Wi-Fi network.

Moreover, the G/O state apparatus can write, in the administration list,not only the identification information of the WFD-compatible apparatusthat is in the client state, but also the identification information ofa WFD-incompatible apparatus. That is, the G/O state apparatus can alsoestablish the WFD connection with the WFD-incompatible apparatus. Ingeneral terms, the WFD connection is a wireless connection in which theMAC address for the WFD of the MFP 10 is used. Further, the WFD networkis a wireless network in which the MAC address for the WFD of the MFP 10is used. Similarly, the normal Wi-Fi connection is a wireless connectionin which the MAC address for the normal Wi-Fi of the MFP 10 is used.Further, the normal Wi-Fi network is a wireless network in which the MACaddress for the normal Wi-Fi of the MFP 10 is used.

By operating the operating unit 12, the user can change a setting of thewireless LAN I/F 20, thereby being able to change to either mode of amode in which wireless communication according to the WFD system usingthe wireless LAN I/F 20 can be executed (called “WFD=ON mode” below),and a mode in which wireless communication according to the WFD systemusing the wireless LAN I/F 20 cannot be executed (called “WFD=OFF mode”below). A mode setting unit 46 sets the mode to either WFD=ON mode orWFD=OFF mode in accordance with the operation of the user. Specifically,the mode setting unit 46 stores, in the memory 34, a mode valuerepresenting the mode set by the user.

Moreover, in the WFD I/F=OFF mode state, the control unit 30 cannotexecute processes according to the WFD system (e.g., a process ofsetting the MFP 10 to spontaneous G/O mode (to be described), G/Onegotiation, etc.). In the WFD I/F=ON state, the memory 34 stores valuesrepresenting the current state of the MFP 10 relating to WFD (the statefrom among G/O state, client state, and device state).

The NFC I/F 22 is an interface for the control unit 30 to executewireless communication according to the NFC system. The NFC I/F 22 isformed of a chip differing physically from the wireless LAN I/F 20.

Moreover, the communication speed of wireless communication via thewireless LAN I/F 20 (e.g., maximum communication speed is 11 to 454Mbps) is faster than the communication speed of wireless communicationvia the NFC I/F 22 (e.g., maximum communication speed is 100 to 424Kbps). Further, the frequency of the carrier wave in wirelesscommunication via the wireless LAN I/F 20 (e.g., 2.4 GHz band, 5.0 GHzband) differs from the frequency of the carrier wave in the wirelesscommunication via the NFC I/F 22 (e.g., 13.56 MHz band). Further, in acase where the distance between the MFP 10 and the mobile device 50 isless than or equal to approximately 10 cm, the control unit 30 canwirelessly communicate with the mobile device 50 according to the NFCsystem via the NFC I/F 22. In a case where the distance between the MFP10 and the mobile device 50 is either less than or equal to 10 cm, or isgreater than or equal to 10 cm (e.g., a maximum is approximately 100 m),the control unit 30 can wirelessly communicate, via the wireless LAN I/F20, with the mobile device 50 according to the WFD system and accordingto the normal Wi-Fi. That is, the maximum distance across which the MFP10 can execute wireless communication with a communication destinationapparatus (e.g., the mobile device 50) via the wireless LAN I/F 20 isgreater than the maximum distance across which the MFP 10 can executethe wireless communication with the communication destination apparatusvia the NFC I/F 22.

The control unit 30 comprises a CPU 32 and the memory 34. The CPU 32executes various processes according to programs stored in the memory34. The CPU 32 realizes the functions of the units 40 to 46 by executingprocesses according to the programs.

The memory 34 is formed of a ROM, RAM, hard disk, etc. The memory 34stores the programs executed by the CPU 32. The memory 34 comprises awork area 38. In the case where the MFP 10 currently belongs to a WFDnetwork, the work area 38 stores information indicating that the MFP 10currently belongs to the WFD network, and a wireless setting (includingauthentication method, encryption method, password, SSID (Service SetIdentifier) and BSSID (Basic Service Set Identifier) of the wirelessnetwork) for communicating object data (e.g., print data) via the WFDnetwork. Further, in the case where the MFP 10 currently belongs to anormal Wi-Fi network, the work area 38 stores information indicatingthat the MFP 10 currently belongs to the normal Wi-Fi network, and awireless setting for communicating object data via the normal Wi-Finetwork. The SSID of the WFD network is a network identifier foridentifying the WFD network, and the SSID of the normal Wi-Fi network isa network identifier for identifying the normal Wi-Fi network. The BSSIDof the WFD network is an identifier unique to the G/O state apparatus(e.g., the MAC address of the G/O state apparatus), and the BSSID of thenormal Wi-Fi network is an identifier unique to the AP (e.g., a uniqueidentifier of the AP).

In the case where the MFP 10 is operating according to the WFD system,the work area 38 further stores a value indicating the current state ofWFD (one state from among G/O state, client state, or device state). Thework area 38 further stores a mode value representing the WFD=ON mode,or a mode value representing the WFD=OFF mode.

Moreover, by operating the operating unit 12, the user can set the MFP10 to spontaneous G/O mode. Spontaneous G/O mode is a mode formaintaining the operation of the MFP 10 in the G/O state. The work area38 within the memory 34 further stores a value indicating whether theMFP 10 has been set to spontaneous G/O mode. When the WFD-compatibleapparatus that is in the device state is to establish a WFD connectionwith another WFD-compatible apparatus that is in the device state, theWFD-compatible apparatus usually executes G/O negotiation to selectivelydetermine which state, of G/O state and client state, it is to operatein. In the case where the MFP 10 has been set to the spontaneous G/Omode, the MFP 10 maintains operation in the G/O state without executingG/O negotiation.

(Configuration of Mobile Device 50)

The mobile device 50 is, for example, a mobile phone (e.g., a SmartPhone), PDA, notebook PC, tablet PC, portable music player, portablevideo player, etc. The mobile device 50 comprises two wirelessinterfaces, a wireless LAN I/F (i.e., an interface for WFD and normalWi-Fi) and an NFC I/F. Consequently, the mobile device 50 is capable ofexecuting wireless communication with the MFP 10 using the wireless LANI/F, and is capable of executing wireless communication with the MFP 10using the NFC I/F. The mobile device 50 comprises an application programfor causing the MFP 10 to execute functions (e.g., print function, scanfunction, etc.). Moreover, the application program may, for example, beinstalled on the mobile device 50 from a server provided by a vendor ofthe MFP 10, or may be installed on the mobile device 50 from a mediashipped together with the MFP 10.

Like the MFP 10, the mobile device 50 comprises a work area 58 within amemory 54. In the case where the mobile device 50 currently belongs tothe WFD network or the normal Wi-Fi network, the work area 58 stores awireless setting (including authentication method, encryption method,password, SSID and BSSID of the wireless network) for executingcommunication via the relevant network. Further, in the case where themobile device 50 is operating according to the WFD system, the work area58 stores a state value representing the state of the mobile device 50(i.e., one state from among G/O state, client state and device state).

(Configuration of PC 8)

The PC 8 comprises a wireless LAN I/F (i.e., an interface for WFD andnormal Wi-Fi), but does not comprise an NFC I/F. Consequently, the PC 8is capable of executing communication with the MFP 10 by using thewireless LAN I/F, but is not capable of executing wireless communicationaccording to the NFC system. The PC 8 comprises a driver program forcausing the MFP 10 to execute a process (e.g., print process, scanprocess, etc.). Moreover, the driver program is usually installed on thePC 8 from a media shipped together with the MFP 10. However, in amodification, the driver program may be installed on the PC 8 from aserver provided by the vendor of the MFP 10.

(Configuration of AP 6)

The AP 6 is not a WFD G/O state apparatus, but is a standard accesspoint called a wireless access point or wireless LAN router. The AP 6can establish a normal Wi-Fi connection with a plurality of apparatuses.Thereby, a normal Wi-Fi network including the AP 6 and the plurality ofapparatuses is constructed. The AP 6 receives data from one apparatusfrom among the plurality of apparatuses belonging to the normal Wi-Finetwork, and sends the data to another one apparatus from among theplurality of apparatuses. That is, the AP 6 relays communication betweena pair of apparatuses belonging to the normal Wi-Fi network.

Moreover, differences between the WFD G/O state apparatus and the normalAP are as follows. In the case where the WFD G/O state apparatusdisconnects from the WFD network to which it currently belongs, andnewly belongs to another WFD network, the WFD G/O state apparatus canoperate in a state other than the G/O state (i.e., the client state). Bycontrast, a normal AP (i.e., the AP 6) executes the function of relayingcommunication between the pair of apparatuses regardless of which normalWi-Fi network the normal AP belongs to, and the normal AP cannot operatein the client state.

(Communication Process Executed by MFP 10)

A communication process executed by the MFP 10 will be described withreference to FIG. 2 . When a power source of the MFP 10 is turned ON,the control unit 30 executes a communication process. In S2, a receivingunit 40 monitors whether NFC information has been received by executingwireless communication according to the NFC system. Moreover, thereceiving unit 40 receives the NFC information via the NFC I/F 22.Specifically, the receiving unit 40 monitors whether an NFCcommunication session has been established between the MFP 10 and themobile device 50. While the power source of the MFP 10 is ON, thereceiving unit 40 causes the NFC I/F 22 to transmit radio waves fordetecting a device capable of executing wireless communication accordingto the NFC system.

The user of the mobile device 50 activates the application program. Byoperating the mobile device 50, the user causes the mobile device 50 tocreate NFC information that includes a process execution instruction(e.g., print instruction, scan instruction) indicating a process thatthe MFP 10 is to execute. In the case where the mobile device 50currently belongs to a wireless network, the NFC information furtherincludes the SSID and BSSID of the wireless network to which the mobiledevice 50 currently belongs. Moreover, the case where the mobile device50 currently belongs to the wireless network is a case in which awireless connection, this being the WFD connection or the normal Wi-Ficonnection, or both, has been established between the mobile device 50and another device (e.g., the AP 6, the MFP 10).

The user can bring the mobile device 50 closer to the MFP 10. Thereby,when the distance between the mobile device 50 and the MFP 10 becomesless than the distance (e.g., 10 cm) where the radio waves reach eachother, the mobile device 50 receives a radio wave from the MFP 10, andsends a response wave to the MFP 10. Consequently, the control unit 30receives the response wave from the mobile device 50, and an NFCcommunication session is established. When the NFC communication sessionhas been established, the mobile device 50 sends the created NFCinformation to the MFP 10.

Upon receiving the NFC information (YES in S2), in S4 a determining unit42 determines whether the MFP 10 currently belongs to a network.Specifically, in the case where the work area 38 stores informationindicating that the MFP 10 currently belongs to the WFD network orinformation indicating that the MFP 10 currently belongs to the normalWi-Fi network, or both, the determining unit 42 determines that the MFP10 currently belongs to a wireless network (YES in S4), and the processproceeds to S6. On the other hand, in the case where neither theinformation indicating that the MFP 10 currently belongs to the WFDnetwork or the information indicating that the MFP 10 currently belongsto the normal Wi-Fi network is stored in the work area 38, thedetermining unit 42 determines that the MFP 10 does not currently belongto a wireless network (NO in S4), and the process proceeds to S8.

In S6, the determining unit 42 confirms whether the mobile device 50currently belongs to the network to which the MFP 10 currently belongs.Specifically, the determining unit 42 first determines whether the SSIDand BSSID of the network to which the mobile device 50 currently belongsare included in the NFC information. In the case where the SSID andBSSID are not included in the NFC information, the determining unit 42determines that the mobile device 50 does not currently belong to thenetwork to which the MFP 10 currently belongs (NO in S6). According tothis configuration, the MFP 10 can appropriately determine that themobile device 50 does not currently belong to the network to which theMFP 10 currently belongs. In the case where the SSID and BSSID of thenetwork to which the mobile device 50 currently belongs are included inthe NFC information, the determining unit 42 determines whether the SSIDand BSSID included in the wireless setting stored in the work area 38are identical to the SSID and BSSID included in the NFC information.

In the case where the SSIDs and BSSIDs are both identical, it isdetermined that the mobile device 50 currently belongs to the network towhich the MFP 10 currently belongs (YES in S6), and the process proceedsto S7. On the other hand, in the case where the SSIDs or the BSSIDs, orboth are not identical, it is determined that the mobile device 50 doesnot currently belong to the network to which the MFP 10 currentlybelongs (NO in S6), and the process proceeds to S8. According to thisconfiguration, the MFP 10 can appropriately determine whether the mobiledevice 50 currently belongs to the network to which the MFP 10 currentlybelongs. Moreover, in S6 the determining unit 42 determines whether theSSIDs are identical, and whether the BSSIDs are identical. Thereby, thedetermining unit 42 can determine whether the MFP 10 and the mobiledevice 50 belong to the same wireless network constructed by the sameAP. More specifically, one AP may construct a plurality of wirelessnetworks by using a plurality of SSIDs. Consequently, in the case wherethe BSSIDs are identical and the SSIDs are not identical, the MFP 10 andthe mobile device 50 could belong to different wireless networksconstructed by the same AP. In the present embodiment, it is possible todetermine more reliably whether the MFP 10 and the mobile device 50belong to the same wireless network by determining whether both theSSIDs and BSSIDs are identical. Moreover, in a modification, it isdetermined in S6 whether the SSIDs are identical, but it need not bedetermined whether the BSSIDs are identical. Thereby, if the SSIDs areidentical, it can be determined that the MFP 10 and the mobile device 50belong to the same wireless network even in the case where the MFP 10and the mobile device 50 each belong to a wireless network constructedby a different access point.

In the case where the mobile device 50 currently belongs to the networkto which the MFP 10 currently belongs, the MFP 10 and the mobile device50 can execute communication via the network to which they currentlybelong. That is, the mobile device 50 can execute wireless communicationwith the MFP 10 by using the wireless setting currently stored in thework area 58. In S7 the control unit 30 sends, without changing thewireless setting of the mobile device 50, information indicating settingchange is unnecessary via the NFC I/F 22, this information indicatingsetting change is unnecessary indicating that the communication of datacan be executed, and the process proceeds to S20. Moreover, theinformation indicating setting change is unnecessary includes the IPaddress of the MFP 10.

In S8 the determining unit 42 determines whether WFD=ON mode has beenset. In the case where the mode value stored in the memory 34 is a valuerepresenting WFD=ON mode, the determining unit 42 determines YES in S8,and proceeds to S10. On the other hand, in the case where the mode valuestored in the memory 34 is a value representing WFD=OFF mode, thedetermining unit 42 determines NO in S8, and the process proceeds to S9.

In S9 a communication executing unit 44 changes the mode from WFD=OFFmode to WFD=ON mode by changing the mode value stored in the memory 34,and the process proceeds to S15. The communication executing unit 44further stores, in the memory 34, setting change information indicatingthat the mode value has been changed.

In S10 the determining unit 42 determines whether the MFP 10 isoperating in the client state in the wireless network to which itcurrently belongs. Specifically, in the case where the state valuestored in the work area 38 is a value representing the client state, thedetermining unit 42 determines that the MFP 10 is operating in theclient state (YES in S10). On the other hand, in the case where thestate value stored in the work area 38 is not a value representing theclient state, the determining unit 42 determines that the MFP 10 is notoperating in the client state (NO in S10). In the case of YES in S10,the process proceeds to S14.

On the other hand, in the case of NO in S10, in S12 the determining unit42 determines whether the MFP 10 is operating in the G/O state in thewireless network to which it currently belongs. Specifically, in thecase where the state value stored in the work area 38 is a valuerepresenting the G/O state, the determining unit 42 determines that theMFP 10 is operating in the G/O state (YES in S12). On the other hand, inthe case where the state value stored in the work area 38 is not a valuerepresenting the G/O state, the determining unit 42 determines that theMFP 10 is not operating in the G/O state (i.e., the MFP 10 is in thedevice state) (NO in S12). In the case of YES in S12, the processproceeds to S13, and in the case of NO in S12, the process proceeds toS15.

In S13 the determining unit 42 determines whether or not the number ofapparatuses other than the MFP 10 included in the WFD network in whichthe MFP 10 is operating in the G/O state (i.e., apparatuses which haveestablished a connection with the MFP 10) is less than a predeterminedmaximum client number. The determining unit 42 determines YES in S13 inthe case where the number of identification information of apparatusesstored in the administration list is less than the maximum clientnumber, and determines NO in S13 in the case where the number is thesame. In the case of YES in S13, the process proceeds to S16, and in thecase of NO in S13, the process proceeds to S14.

In S14 the communication executing unit 44 sends communication NGinformation to the mobile device 50 by using the NFC I/F 22 the processreturns to S2. This communication NG information may indicate that theMFP 10 and the mobile device 50 currently cannot execute communication.

In S15 the communication executing unit 44 sets the MFP 10 tospontaneous G/O mode. Spontaneous G/O mode is a mode which keeps the MFP10 operating in the G/O state. Consequently, the MFP 10 is set to theG/O state although a WFD network has not been constructed at the stageof S15. In the case where the MFP 10 is set to the G/O state, thecommunication executing unit 44 prepares a wireless setting (SSID,BSSID, authentication method, encryption method, password, etc.) for theWFD-compatible apparatus and/or the WFD-incompatible apparatus toexecute wireless communication, via the WFD network, with the MFP 10that is operating in the G/O state. According to this configuration, theMFP 10 can execute wireless communication with the apparatus thatreceives the wireless setting from the MFP 10 regardless of whether theapparatus that receives the wireless setting (the mobile device 50 inthe present embodiment) is a WFD-compatible apparatus or aWFD-incompatible apparatus.

Moreover, the authentication method and encryption method arepredetermined. Further, the communication executing unit 44 creates apassword. Moreover, the SSID may be created by the communicationexecuting unit 44 at the time the password is created, or may bepredetermined. The BSSID is the MAC address of the MFP 10. Moreover, atthis stage, identification information of the apparatus connected withthe G/O state apparatus is not described in the administration listmanaged by the MFP 10.

In S16, the communication executing unit 44 sends the prepared wirelesssetting to the mobile device 50 using the NFC I/F 22. In the case whereprocess S16 is executed after process S15, the communication executingunit 44 sends, to the mobile device 50, the wireless setting which wasprepared at the stage of setting the spontaneous G/O mode (S15). In thecase where process S16 is executed after process S13, the communicationexecuting unit 44 uses the NFC I/F 22 to send, to the mobile device 50,the wireless setting which was prepared at the stage of constructing theWFD network in which the MFP 10 is operating in the G/O state.

Next, in S18 the communication executing unit 44 establishes a WFDconnection between the MFP 10 and the mobile device 50 by using thewireless LAN I/F 20. Upon receiving, from the MFP 10, the wirelesssetting of the MFP 10 that is operating in the G/O state, the mobiledevice 50 stores the received wireless setting in the work area 58.Consequently, the mobile device 50 executes wireless communicationaccording to normal Wi-Fi. Next, the communication executing unit 44executes the wireless communication of an Authentication Request,Authentication Response, Association Request, Association Response, and4-way handshake with the mobile device 50. Various authenticationprocesses such as authentication of SSID, authentication ofauthentication method and encryption method, authentication of password,etc. are executed during the course of the wireless communication. In acase where all the authentications succeed, a wireless connection isestablished between the MFP 10 and the mobile device 50.

Moreover, in the process S18, the communication executing unit 44acquires the MAC address of the mobile device 50 by using the wirelessLAN I/F 20. When the wireless connection has been established, thecontrol unit 30 further adds the MAC address of the mobile device 50 tothe administration list. Moreover, the MAC address of the mobile device50 is included in the NFC information. Thereby, the MFP 10 that is inthe G/O state becomes able to communicate object data (print data, scandata, etc.) with the mobile device 50 according to the normal Wi-Fi.Moreover, the object data includes network layer data, which is a layerhigher than the physical layer of the OSI reference model. Consequently,the MFP 10 that is in the G/O state can execute wireless communicationof the network layer with the mobile device 50 that is in the clientstate.

Next, in S20 the communication executing unit 44 executes a datacommunication process with the mobile device 50 via the wireless LAN I/F20. The contents of the data communication process vary depending on thecontents of the process execution instruction included in the NFCinformation. In the case where the process execution instruction is aprint instruction, the communication executing unit 44 receives printdata from the mobile device 50 in the data communication process. Inthis case, the control unit 30 causes the print executing unit 16 toexecute a print process using the received print data.

On the other hand, in the case where the process execution instructionis a scan instruction, the control unit 30 causes the scan executingunit 18 to scan a document that has been set on the scan executing unit18, creating scan data. Next, the communication executing unit 44 sendsthe created scan data to the mobile device 50.

Next, in S21 the communication executing unit 44 monitors, by using thewireless LAN I/F 20, whether a disconnection request for disconnectingthe connection with the mobile device 50 has been received from themobile device 50. In the case where a disconnection request has not beenreceived even though a predetermined time has elapsed (NO in S21), theprocess returns to S2. On the other hand, in the case where adisconnection request has been received from the mobile device 50 withina predetermined time since the ending of the data communication processof S20 (YES in S21), the communication executing unit 44 disconnects thewireless connection with the mobile device 50. Specifically, thecommunication executing unit 44 deletes the MAC address of the mobiledevice 50 within the administration list. Next, in S22 the communicationexecuting unit 44 determines whether the setting of the wireless LAN I/F20 was changed by the process S9. Specifically, in the case wheresetting change information is being stored in the memory 34, thecommunication executing unit 44 determines that the mode value waschanged in S9 from the mode value indicating WFD=OFF mode to the modevalue indicating WFD=ON mode (YES in S22), and proceeds to S23. On theother hand, in the case where setting change information is not beingstored in the memory 34, the communication executing unit 44 determinesthat the mode value was not changed in S9 from the mode value indicatingWFD=OFF mode to the mode value indicating WFD=ON mode (NO in S22), andthe process returns to S2.

In S23, the communication executing unit 44 determines whether anexternal device (e.g., the PC 8) other than the mobile device 50currently belongs to the WFD network newly constructed in S18.Specifically, in the case where identification information other thanthe identification information of the mobile device 50 is included inthe administration list, the communication executing unit 44 determinesthat the external device currently belongs to the WFD network (YES inS23). In this case, without changing the mode value, the process returnsto S2. According to this configuration, it is possible to prevent theMFP 10 from being disconnected from the WFD network in the case wherethe external device currently belongs to the WFD network.

On the other hand, in the case where identification information otherthan the mobile device 50 is not included in the administration list,the communication executing unit 44 determines that the external devicedoes not currently belong to the WFD network (NO in S23), and proceedsto S24. In S24 the communication executing unit 44 changes the modevalue from the mode value indicating WFD=ON mode to the mode valueindicating the WFD=OFF mode, and the process returns to S2. That is, inthe communication process, in the case where it is determined in S8 thatthe mode value is the WFD=OFF mode, the mode value is changed from theWFD=OFF mode to the WFD=ON mode so that wireless communication with themobile device 50 is executed temporarily via the WFD network by usingthe wireless LAN I/F 20. When the mode value is changed from the WFD=ONmode to the WFD=OFF mode in S25, the WFD network constructed in S18ceases to exist. According to this configuration, in the case where themode value was changed from the mode value indicating WFD=OFF mode tothe mode value indicating the WFD=ON mode during the communicationprocess, it is possible to return to the setting from before the modevalue was changed.

Advantages of Present Embodiment

Advantages of the present embodiment in first to fifth situations willbe described with reference to FIGS. 3 to 7 . Moreover, processescorresponding to the communication process of FIG. 2 are shown in eachof FIGS. 3 to 7 .

(First Situation)

The first situation shown in FIG. 3 is a situation where the MFP 10 andthe mobile device 50 currently belong to the same WFD network or thesame normal Wi-Fi network. In this situation, when NFC information isreceived from the mobile device 50 by using the NFC I/F 22, in S6 theMFP 10 determines that the mobile device 50 currently belongs to thenetwork to which the MFP 10 currently belongs (YES in S6). In S7 the MFP10 sends the information indicating setting change is unnecessary to themobile device 50 by using the NFC I/F 22. Upon receiving the informationindicating setting change is unnecessary, the mobile device 50 sendsprint data to the MFP 10 using the IP address included in theinformation indicating setting change is unnecessary and the wirelesssetting stored in the work area 58. The MFP 10 receives the print databy using the wireless LAN I/F 20 (S20). Upon receiving the print data,the MFP 10 causes the print executing unit 16 to execute the printprocess.

Moreover, in the sequence view of the present specification, thewireless communication executed by the MFP 10 by using the NFC I/F 22(i.e., wireless communication according to the NFC system), and thewireless communication executed by the MFP 10 by using the wireless LANI/F 20 (i.e., wireless communication according to the WFD system ornormal Wi-Fi) is represented by arrows. The arrows representing thewireless communication using the wireless LAN I/F 20 are fatter than thearrows representing the wireless communication using the NFC I/F 22.

According to this configuration, in the case where the MFP 10 determinesthat the mobile device 50 currently belongs to the network to which theMFP 10 currently belongs, the MFP 10 can appropriately execute thecommunication of print data via the network to which the MFP 10 and themobile device 50 currently belong without changing the wireless settingto which the MFP 10 and the mobile device 50 are currently set.

(Second Situation)

In the second situation shown in FIG. 4 , the MFP 10 currently belongsto the WFD network. The MFP 10 is operating in the G/O state in the WFDnetwork. The PC 8 that is in the client state currently belongs to theWFD network. The mobile device 50 does not currently belong to thewireless network to which the MFP 10 currently belongs. The mobiledevice 50 may currently belong, or may not belong, to a wireless networkother than the wireless network to which the MFP 10 currently belongs.

In this situation, upon receiving the NFC information from the mobiledevice 50 by using the NFC I/F 22, the MFP 10 determines in S6 that themobile device 50 does not currently belong to the WFD network to whichthe MFP 10 currently belongs (NO in S6). Moreover, in the case where themobile device 50 currently belongs to a wireless network, the NFCinformation includes the SSID and BSSID of the wireless network.However, in the case where the mobile device 50 does not currentlybelong to a wireless network, the NFC information does not include theSSID and BSSID of a wireless network. In S12, the MFP 10 determines thatthe MFP 10 is in the G/O state (YES in S12). In this case, in S16, theMFP 10 sends the wireless setting of the MFP 10 stored in the work area38 and the IP address of the MFP 10 to the mobile device 50 by using theNFC I/F 22. Upon receiving the wireless setting, the mobile device 50stores the received wireless setting in the work area 58. Next, the MFP10 and the mobile device 50 establish a WFD connection (S18). Thereby,the mobile device 50 can belong to the WFD network to which the MFP 10currently belongs. Moreover, by using the NFC I/F 22, the MFP 10 sends awireless setting including the authentication method and the encryptionmethod of the MFP 10 to the mobile device 50. According to thisconfiguration, the mobile device 50 can execute an authenticationprocess according to the authentication method and encryption methodreceived from the MFP 10, and need not execute any process to verifywhether an authentication method and encryption method is to be used.Consequently, the MFP 10 and the mobile device 50 can establish aconnection comparatively promptly.

Next, the mobile device 50 sends print data to the MFP 10 by using thewireless setting stored in the work area 58 and the IP address receivedin S16. The MFP 10 receives the print data by using the wireless LAN I/F20 (S20). Upon receiving the print data, the MFP 10 causes the printexecuting unit 16 to execute a print process. According to thisconfiguration, in the case where the MFP 10 is operating in the G/Ostate in the WFD network, the MFP 10 can appropriately execute thecommunication of print data with the mobile device 50 via the WFDnetwork to which the MFP 10 currently belongs.

(Third Situation)

In the third situation shown in FIG. 5 , the MFP 10 currently belongs tothe WFD network. The MFP 10 is operating in the client state in the WFDnetwork. The PC 8 that is in the G/O state currently belongs to the WFDnetwork, whereas the mobile device 50 does not currently belong. Themobile device 50 is in the same state as in the second situation.

In this situation, upon receiving NFC information from the mobile device50 by using the NFC I/F 22, the MFP 10 determines in S6 that the mobiledevice 50 does not currently belong to the WFD network to which the MFP10 currently belongs (NO in S6). In S10 the MFP 10 determines that theMFP 10 is in the client state (YES in S10). In this case, in S14 the MFP10 sends the communication NG information to the mobile device 50 byusing the NFC I/F 22.

In this case, the MFP 10 does not send the wireless setting stored inthe work area 38 to the mobile device 50. According to thisconfiguration, the wireless setting of the PC 8 that is operating in theG/O state in the WFD network does not need to be provided to the mobiledevice 50. Thereby, it is possible to prevent the mobile device 50 fromentering the WFD network. Further, by receiving the communication NGinformation from the MFP 10, the mobile device 50 can notify the user ofthe mobile device 50 that the MFP 10 is not executing the communicationof object data with the mobile device 50.

(Fourth Situation)

In a fourth situation shown in FIG. 6 , the MFP 10 is set to the WFD=ONmode, but does not currently belong to a WFD network. That is, the MFP10 is operating in the device state. Moreover, the state of the MFP 10is either a state of currently belonging or not currently belonging to anormal Wi-Fi network. The mobile device 50 is in the same state as inthe second situation.

In this situation, upon receiving NFC information from the mobile device50 by using the NFC I/F 22, the MFP 10 determines in S4 that the MFP 10does not currently belong to a network (NO in S4: the case where the MFP10 is in the state of not currently belonging to the normal Wi-Finetwork), or the MFP 10 determines in S6 that the mobile device 50 doesnot currently belong to the normal Wi-Fi network to which the MFP 10currently belongs (YES in S6: the MFP 10 is in a state of currentlybelonging to a normal Wi-Fi network). Further, in S10 and S12, the MFP10 determines that the MFP 10 is not in either the G/O state or theclient state (NO in both S10, S12). In this case, in S15 the MFP 10 setsthe MFP 10 to spontaneous G/O mode without executing the G/Onegotiation.

Next, in S16, the MFP 10 sends the wireless setting of the MFP 10 storedin the work area 38 (i.e., the wireless setting prepared at the stage ofsetting spontaneous G/O mode in S15) and the IP address of the MFP 10 tothe mobile device 50 by using the NFC I/F 22. Upon receiving thewireless setting, the mobile device 50 stores the received wirelesssetting in the work area 58. Next, the MFP 10 and the mobile device 50establish a WFD connection (S18). Thereby, the mobile device 50 canbelong to the WFD network in which the MFP 10 is operating in the G/Ostate.

Next, the mobile device 50 sends print data to the MFP 10 by using thewireless setting stored in the work area 58 and the IP address receivedin S16. The MFP 10 receives the print data by using the wireless LAN I/F20 (S20). Upon receiving the print data, the MFP 10 causes the printexecuting unit 16 to execute the print process. According to thisconfiguration, the MFP 10 can newly construct a WFD network in which theMFP 10 is operating in the G/O state in the WFD network. Thereby, theMFP 10 can appropriately execute the communication of print data withthe mobile device 50 via the newly constructed WFD network. Further,since the MFP 10 is necessarily operating in the G/O state in the newlyconstructed WFD network, the MFP 10 can determine an authenticationmethod, etc. to be used in the WFD network.

(Fifth Situation)

In the fifth situation shown in FIG. 7 , the MFP 10 is set to theWFD=OFF mode. Moreover, the state of the MFP 10 is either the state ofcurrently belonging or not currently belonging to the normal Wi-Finetwork. The mobile device 50 is in the same state as in the secondsituation.

In this situation, upon receiving the NFC information from the mobiledevice 50 by using the NFC I/F 22, NO is determined in S4 or S6 in thesame manner as in the fourth situation. The MFP 10 determines in S8 thatthe MFP 10 is set to the WFD=OFF mode. In this case, in S9 the MFP 10changes the mode from the WFD=OFF mode to the WFD=ON mode. Next, in S15the MFP 10 sets the MFP 10 to the spontaneous G/O mode.

Below, the processes until the print process are the same as in thefourth situation. In this configuration, also, the same advantages as inthe fourth situation can be achieved. When the print process ends, theMFP 10 determines that an external device does not currently belong tothe newly constructed WFD network (NO in S23), and changes the mode fromthe WFD=ON mode to the WFD=OFF mode. According to this configuration, inthe case where the external device does not belong to the WFD networkafter the communication of print data, the mode can appropriately bechanged from the WFD=ON mode to the WFD=OFF mode.

In the present embodiment, the MFP 10 can, by using the wireless LAN I/F20, appropriately execute the wireless communication of object data withthe mobile device 50 at a comparatively fast communication speed byexecuting processes in accordance with whether the MFP 10 currentlybelongs to the same network as the mobile device 50, i.e., in accordancewith whether the MFP 10 is capable of communicating with the mobiledevice 50. Further, the MFP 10 can execute the communication of objectdata with the mobile device 50 via the WFD network without the MFP 10and the mobile device 50 communicating via different access points.

Further, in the case where the MFP 10 is not capable of communicatingwith the mobile device 50 and the MFP 10 currently belongs to the WFDnetwork, the MFP 10 can appropriately execute the communication of theobject data with the mobile device 50 via the WFD network to which theMFP 10 currently belongs. Further, in the case where the MFP 10 does notcurrently belong to the WFD network, the MFP 10 can appropriatelyexecute the communication of the object data with the mobile device 50via the newly constructed WFD network.

(Corresponding Relationships)

The MFP 10 is an example of the “communication device”, the NFC I/F 22is an example of the “first type of interface”, and the wireless LAN I/F20 is an example of the “second type of interface”. Moreover, from theabove description, since the NFC I/F 22 (i.e., the “first type ofinterface”) executes communication using the wireless LAN I/F 20 (i.e.,the “second type of interface”), the NFC I/F 22 can be called aninterface used for communication executed between the MFP 10 (i.e., the“communication device”) and the mobile device 50.

The AP 6 is an example of the “access point”. That is, the “accesspoint” is a device that, within a network to which the access pointbelongs, i.e., a normal Wi-Fi network, relays communication between apair of apparatuses belonging to the normal Wi-Fi network.

The NFC information is an example of the “specific information”, and theSSID and BSSID included in the NFC information is the “wireless networkidentifier included in the specific information”. The state of themobile device 50 currently belonging to the network to which the MFP 10currently belongs is the “communication-enabled state”. The processesS15 to S18 are an example of the “specific process”. Wirelesscommunication via the WFD network by using the wireless LAN I/F 20 is anexample of the “specific wireless communication”. The G/O state is anexample of the “parent station state”, and the client state is anexample of the “child station state”. In the case where YES isdetermined in S4, the WFD network to which the MFP 10 belongs is anexample of the “first wireless network”, and the WFD network constructedby the processes S15 to S18 is an example of the “second wirelessnetwork”. The communication NG information is an example of the“information indicating that the communication of object data is notexecuted”. The WFD=ON mode is an example of the “first mode”, and theWFD=OFF mode is an example of the “second mode”.

Second Embodiment

Points differing from the first embodiment will be described. In thepresent embodiment, a communication process of FIG. 8 is executedinstead of the communication process of FIG. 2 . S2 to S24 of FIG. 8 arethe same as the processes S2 to S24 of FIG. 2 . In the case of YES inS10, i.e., in the case where the MFP 10 currently belongs to the WFDnetwork and is operating in the client state in the WFD network, in S42the determining unit 42 determines whether the MFP 10 is capable ofdisconnecting from the WFD network to which it currently belongs.Specifically, in the case of either the situation where datacommunication is currently being executed via the WFD network or thesituation where data communication is to be executed via the WFDnetwork, the determining unit 42 determines that the MFP 10 is notcapable of disconnecting from the WFD network to which it currentlybelongs (NO in S42). On the other hand, in the case of neither thesituation where data communication is being executed via the WFD networknor the situation where data communication is to be executed, thedetermining unit 42 determines that the MFP 10 is capable ofdisconnecting from the WFD network to which it currently belongs (YES inS42).

For example, a case is assumed where the PC 8 is operating in the G/Ostate in a WFD network to which the MFP 10 currently belongs. In thecase where the MFP 10 is currently receiving print data from the PC 8 byusing the wireless LAN I/F 20, the determining unit 42 determines asituation where data communication is currently being executed. Further,in the case where the MFP 10 is creating scan data in accordance with ascan instruction from the PC 8 and, once the scan data is created, theMFP 10 is to send the scan data to the PC 8 by using the wireless LANI/F 20, a situation where data communication is to be executed isdetermined.

In the case of NO in S42, the process proceeds to S14, and in the caseof YES in S42, the process proceeds to S44. In S44, the communicationexecuting unit 44 disconnects the MFP 10 from the WFD network to whichthe MFP 10 is currently joined. Specifically, the communicationexecuting unit 44 deletes the wireless setting that is being stored inthe work area 38, and changes the state value in the work area 38 to avalue representing the device state. Next, the communication executingunit 44 executes the process S15.

Advantages of Present Embodiment

The MFP 10 of the second embodiment can achieve the same advantages asthe MFP 10 of the first embodiment in the first, second, fourth, andfifth situations. The advantages of the present embodiment in sixth andseventh situations will be described with reference to FIGS. 9 and 10 .Moreover, processes corresponding to the communication process of FIG. 8are shown in each of FIGS. 9 and 10 .

(Sixth Situation)

In the sixth situation shown in FIG. 9 , the MFP 10 currently belongs toa WFD network. The MFP 10 is operating in the client state in the WFDnetwork. The PC 8 that is in the G/O state currently belongs to the WFDnetwork, but the mobile device 50 does not currently belong to the WFDnetwork. The mobile device 50 is in the same state as in the secondsituation. Further, the MFP 10 is receiving print data from the PC 8.

In this situation, when NFC information is received from the mobiledevice 50 by using the NFC I/F 22, NO is determined in S6 and YES isdetermined in S10, as in the third situation. Since the MFP 10 isreceiving print data from the PC 8, it is determined that the MFP 10 isnot capable of disconnecting from the WFD network (NO in S42). In thiscase, in S14 the MFP 10 sends the communication NG information to themobile device 50 via the NFC I/F 22.

According to this configuration, in the case where the MFP 10 isexecuting data communication via the WFD network to which the MFP 10currently belongs, or in the case where the MFP 10 is to execute datacommunication via the WFD network to which the MFP 10 currently belongs,the MFP 10 can be prevented from disconnecting from the WFD network towhich it currently belongs.

(Seventh Situation)

In the seventh situation shown in FIG. 10 , the MFP 10 currently belongsto a WFD network. The MFP 10 is operating in the client state in the WFDnetwork. The PC 8 that is in the G/O state currently belongs to the WFDnetwork, but the mobile device 50 does not currently belong to the WFDnetwork. However, the MFP 10 is not in the situation of currentlyexecuting the data communication with the PC 8, nor is in the situationwhere it is to execute the data communication with the PC 8. The mobiledevice 50 is in the same state as in the second situation.

In this situation, when NFC information is received from the mobiledevice 50 by using the NFC I/F 22, NO is determined in S6 and YES isdetermined in S10, as in the sixth situation. Since the MFP 10 is not inthe situation of executing the data communication via the WFD networknor in the situation where it is to execute the data communication, itis determined that the MFP 10 is capable of disconnecting from the WFDnetwork to which it currently belongs (YES in S42). In this case, in S15the MFP 10 sets the MFP 10 to the spontaneous G/O mode. The subsequentprocesses are the same as the processes after the MFP 10 was set to thespontaneous G/O mode in the fourth situation.

According to this configuration, the MFP 10 disconnects from the WFDnetwork in which the MFP 10 is operating in the client state, and cannewly construct a WFD network. Thereby, the MFP 10 can appropriatelyexecute the communication of object data with the mobile device 50 viathe newly constructed WFD network.

(Corresponding Relationships)

The processes S42, S44 and the processes S15 to S18 of FIG. 8 are anexample of the “specific process”.

Third Embodiment

Points differing from the first embodiment will be described. In thepresent embodiment, a communication process of FIG. 11 is executedinstead of the communication process of FIG. 2 . Moreover, in thepresent embodiment, the mobile device 50 sends, to the MFP 10, NFCinformation further including WFD-compatible information, indicatingwhether the mobile device 50 is capable of executing wirelesscommunication according to the WFD system, and device ID of the mobiledevice 50 (e.g., MAC address, serial number, etc.).

S2 to S24 of FIG. 11 are the same as the processes S4 to 24 of FIG. 2 .In the case where the process S9 is executed, and in the case where NOis determined in S12, i.e., in the case where the MFP 10 is operating inthe device state, the determining unit 42 determines in S52, by usingthe NFC information, whether the mobile device 50 is capable ofexecuting wireless communication according to the WFD system. In thecase where WFD-compatible information indicating that the mobile device50 is capable of executing wireless communication according to the WFDsystem is included in the NFC information, the determining unit 42determines that the mobile device 50 is capable of executing wirelesscommunication according to the WFD system (YES in S52), and the processproceeds to S54.

On the other hand, in the case where WFD-compatible informationindicating that the mobile device 50 is capable of executing wirelesscommunication according to the WFD system is not included in the NFCinformation, the determining unit 42 determines that the mobile device50 is not capable of executing wireless communication according to theWFD system (NO in S52), and the process proceeds to S15.

In S54 the communication executing unit 44 sends WFD connection startinformation indicating that the WFD connection is being started to themobile device 50 via the NFC I/F 22. A WPS (abbreviation of: Wi-FiProtected Setup) wireless connection system is used as a system forexecuting the WFD system wireless connection. WPS wireless connectionsystems include a PBC (abbreviation of: Push Button Configuration)system and a PIN (abbreviation of: Personal Identification Number) codesystem. In the present embodiment, the PBC code system will bedescribed. However, the technique of the present embodiment can also beapplied to the PIN code system. The WFD connection start informationincludes information indicating that the PBC code system is used as thesystem for executing the WFD system wireless connection. The WFDconnection start information further includes a device ID of the MFP 10(e.g., MAC address, serial number, etc.). Thereby, the mobile device 50that receives the WFD connection start information can recognize anapparatus (i.e., the MFP 10) identified by the device ID included in theWFD connection start information, and that processes S58, S62 (to bedescribed) are to be executed.

Upon receiving the WFD connection start information, the mobile device50 determines whether the mobile device 50 is set so as to be capable ofexecuting the wireless communication according to the WFD system. In thecase of being set so as to be capable of executing the wirelesscommunication according to the WFD system, the mobile device 50maintains the wireless LAN I/F setting, and in the case of not being setso as to be capable of executing the wireless communication according tothe WFD system, the mobile device 50 changes to a setting allowing it tobe capable of executing the wireless communication according to the WFDsystem.

Next, in S55 the communication executing unit 44 searches for the mobiledevice 50. Specifically, the communication executing unit 44sequentially executes a Scan process, a Listen process, and a Searchprocess. The Scan process is a process for searching for a G/O stateapparatus present in the surroundings of the MFP 10. Specifically, inthe Scan process, the communication executing unit 44 wirelessly sends aProbe Request signal, sequentially, by using 13 channels 1 ch to 13 chsequentially. Moreover, this Probe Request signal includes P2P (Peer 2Peer) information indicating that the MFP 10 is capable of executing theWFD function.

For example, in the case where a G/O state WFD-compatible apparatus(called “specific G/O apparatus” below) is present in the surroundingsof the MFP 10, it is predetermined that the specific G/O apparatus usesone channel from among 1 ch to 13 ch. Consequently, the specific G/Oapparatus wirelessly receives a Probe Request signal from the MFP 10. Inthis case, the specific G/O apparatus wirelessly sends a Probe Responsesignal to the MFP 10. This Probe Response signal includes P2Pinformation indicating that the specific G/O apparatus is capable ofexecuting the WFD function, and information indicating that the specificG/O apparatus is in the G/O state. Consequently, the communicationexecuting unit 44 can find the specific G/O apparatus. Moreover, theProbe Response signal further includes information indicating a devicename of the specific G/O apparatus and a category (e.g., mobile device,PC, etc.) of the specific G/O apparatus, and a MAC address of thespecific G/O apparatus. Consequently, the communication executing unit44 can acquire information related to the specific G/O apparatus.

In the case where the device ID of the specific G/O apparatus includedin the Probe Response signal and the device ID of the mobile device 50included in the NFC information are identical, the communicationexecuting unit 44 can identify that the specific G/O apparatus is themobile device 50. That is, in the case where the mobile device 50currently belongs to the WFD network and the mobile device 50 isoperating in the G/O state in the WFD network, the communicationexecuting unit 44 can find the mobile device 50 by means of the Scanprocess.

Moreover, for example, in the case where a device state WFD-compatibleapparatus (called “specific device apparatus” below) is present in thesurroundings of the MFP 10, it is predetermined that the specific deviceapparatus uses one channel from among 1 ch, 6 ch, and 11 ch.Consequently, the specific device apparatus also wirelessly receives aProbe Request signal from the MFP 10. In this case, the specific deviceapparatus wirelessly sends a Probe Response signal to the MFP 10.However, this Probe Response signal includes information indicating thatthe specific device apparatus is in the device state, and does notinclude information indicating that the specific device apparatus is inthe G/O state. Further, even if an apparatus that is in the client statewirelessly receives the Probe Request signal from the MFP 10, the clientstate apparatus does not wirelessly send the Probe Response signal tothe MFP 10. Consequently, in the Scan process, the communicationexecuting unit 44 can find the mobile device 50 in either the G/O stateor the device state.

The Listen process is a process for responding to the Probe Requestsignal. The specific device apparatus can wirelessly send the ProbeRequest signal during the Search process (to be described). That is, inthe case where the current state of the mobile device 50 is the devicestate, the mobile device 50 periodically sends the Probe Request signalwirelessly. This Probe Request signal includes the device ID of themobile device 50 (e.g., MAC address, serial number, etc.).

In the case where the device ID of the specific device apparatusincluded in the Probe Request signal and the device ID of the mobiledevice 50 included in the NFC information are identical, thecommunication executing unit 44 can identify that the specific deviceapparatus is the mobile device 50. That is, in the case where the mobiledevice 50 is operating in the device state, the communication executingunit 44 can find the mobile device 50 by means of the Listen process.Upon receiving the Probe Request signal from the mobile device 50, thecommunication executing unit 44 wirelessly sends a Probe Responsesignal.

In the Search process, the communication executing unit 44 sequentiallyuses the three channels 1 ch, 6 ch, 11 ch to sequentially send the ProbeRequest signal wirelessly. Thereby, the communication executing unit 44wirelessly receives the Probe Response signal from the specific deviceapparatus. This Probe Response signal includes the P2P informationindicating that the specific device apparatus is capable of executingthe WFD function, information indicating that the specific deviceapparatus is in the device state, and the device ID of the specificdevice apparatus (e.g., MAC address, serial number, etc.). In the casewhere the current state of the mobile device 50 is the device state, themobile device 50 wirelessly sends the Probe Response signal in responseto the Probe Request signal sent from the MFP 10.

In the case where the device ID of the specific device apparatusincluded in the Probe Response signal and the device ID of the mobiledevice 50 included in the NFC information are identical, thecommunication executing unit 44 can identify that the specific deviceapparatus is the mobile device 50. That is, in the case where the mobiledevice 50 currently belongs to the WFD network and is operating in thedevice state in the WFD network, the communication executing unit 44 canfind the mobile device 50 by means of the Search process.

In S55 the communication executing unit 44 can find the mobile device 50(YES in S56) both in the case where the mobile device 50 is operating inthe G/O state and in the case where the mobile device 50 is operating inthe device state. In the case where the mobile device 50 was not foundin S56 (NO in S56), the process proceeds to S14.

In the case where the mobile device 50 is found (YES in S56), in S57 thecommunication executing unit 44 determines whether the found mobiledevice 50 is in the device state. Specifically, in the case whereinformation indicating that the mobile device 50 is in the device stateis received in the process S55, it is determined that the mobile device50 is in the device state (YES in S57), and the process proceeds to S58.On the other hand, in the case where information indicating that themobile device 50 is in the device state is not received in the processS55, it is determined that the mobile device 50 is not in the devicestate (i.e., the mobile device 50 is in the G/O state) (NO in S57), andthe process proceeds to S62.

In S58, by using the wireless LAN I/F 20, the communication executingunit 44 executes the G/O negotiation with the mobile device 50,determining that one apparatus of the MFP 10 and the mobile device 50 isto operate in the G/O state and the other apparatus is to operate in theclient state.

Specifically, the communication executing unit 44 first wirelessly sendsa connection request signal to the mobile device 50. Consequently, themobile device 50 also wirelessly sends an OK signal to the MFP 10. Next,the communication executing unit 44 wirelessly sends informationindicating G/O priority of the MFP 10 to the mobile device 50, andreceives information indicating G/O priority of the mobile device 50from the mobile device 50. Moreover, the G/O priority of the MFP 10 isan index indicating the degree to which the MFP 10 should become theG/O, and is predetermined in the MFP 10. Similarly, the G/O priority ofthe mobile device 50 is an index indicating the degree to which themobile device 50 should become the G/O. For example, an apparatus inwhich the capacity of the CPU and the memory is comparatively high (e.g.the MFP 10) can execute another process rapidly while operating as theG/O. Consequently, the G/O priority is usually set in this type ofapparatus so that it has a high possibility of becoming the G/O. On theother hand, e.g., an apparatus in which the capacity of the CPU and thememory is comparatively low (e.g., the mobile device 50) might be unableto execute another process rapidly while operating as the G/O.Consequently, the G/O priority is usually set in this type of apparatusso that it has a low possibility of becoming the G/O.

The communication executing unit 44 compares the G/O priority of the MFP10 and the G/O priority of the mobile device 50, and determines that theapparatus with high priority (the MFP 10 or the mobile device 50) is tooperate in the G/O state, and the apparatus with low priority (the MFP10 or the mobile device 50) is to operate in the client state. In thecase of determining that the MFP 10 is to operate in the G/O state, thecommunication executing unit 44 changes the state value in the memory 34from the value corresponding to the device state to the valuecorresponding to the G/O state. Consequently, the MFP 10 becomes able tooperate in the G/O state. Further, in the case of determining that theMFP 10 is to operate in the client state, the communication executingunit 44 changes the state value in the memory 34 from the valuecorresponding to the device state to the value corresponding to theclient state. Consequently, the MFP 10 becomes able to operate in theclient state. Moreover, the G/O state and the client state of the mobiledevice 50 are determined based on the G/O priority of the MFP 10 and theG/O priority of a target apparatus by using the same method as the MFP10. When the G/O negotiation of S58 ends, the process proceeds to S62.

In S62 the communication executing unit 44 establishes a connectionbetween the MFP 10 and the mobile device 50 according to WPS.Specifically, the communication executing unit 44 determines whether thecurrent state of the MFP 10 is the G/O state and the current state ofthe mobile device 50 is the client state or not. In the case where thecurrent state of the MFP 10 is the G/O state and the current state ofthe mobile device 50 is the client state, the communication executingunit 44 executes WPS negotiation for the G/O state.

Specifically, the communication executing unit 44 creates the wirelesssetting needed to establish the wireless connection (SSID,authentication method, encryption method, password, etc.), andwirelessly sends it to the mobile device 50. Moreover, theauthentication method and encryption method are predetermined. Further,the communication executing unit 44 creates a password at the time ofcreating the wireless setting. Moreover, the SSID may be created by thecommunication executing unit 44, or may be predetermined. Sending thewireless setting to the mobile device 50 allows the MFP 10 and themobile device 50 to use the same wireless setting. That is, by using thewireless setting, the MFP 10 and the mobile device 50 execute thewireless communication of an Authentication Request, AuthenticationResponse, Association Request, Association Response, and 4-wayhandshake. Various authentication processes such as authentication ofthe SSID, authentication of the authentication method and encryptionmethod, authentication of the password, etc. are executed during thisprocess. In a case where all the authentications succeed, a wirelessconnection is established between the MFP 10 and the mobile device 50.Thereby, the state is achieved where the MFP 10 and the mobile device 50belong to the same WFD network.

On the other hand, in the case where the current state of the MFP 10 isthe client state and the current state of the target apparatus is theG/O state, the communication executing unit 44 executes the WPSnegotiation for the client state. Specifically, the mobile device 50creates the wireless setting needed to establish the wireless connection(SSID, authentication method, encryption method, password, etc.), andwirelessly sends it to the MFP 10. Consequently, the communicationexecuting unit 44 wirelessly receives the wireless setting from themobile device 50. The subsequent processes (the communication processesof the Authentication Request, etc.) are the same as in the WPSnegotiation for the G/O state. Thereby, a state is achieved where theMFP 10 and the mobile device 50 belong to the same WFD network.Consequently, it becomes possible to execute the wireless communicationof object data (print data, etc.) between the MFP 10 that is in theclient state and the mobile device 50 that is in the G/O state. When S62ends, the control unit 30 executes the processes S20 to S24 of FIG. 2 ,ending the communication process.

Advantages of Present Embodiment

The MFP 10 of the third embodiment can achieve the same advantages asthe MFP 10 of the first embodiment in the first to third situations. Theadvantages of the present embodiment in eighth and ninth situations willbe described with reference to FIGS. 12, 13 . Moreover, processescorresponding to the communication process of FIG. 11 are shown in eachof FIGS. 12, 13 .

(Eighth Situation)

In the eighth situation shown in FIG. 12 , the MFP 10 is set to theWFD=ON mode, but does not currently belong to the WFD network. That is,the MFP 10 is operating in the device state. Moreover, the state of theMFP 10 is either the state of currently belonging or not currentlybelonging to the normal Wi-Fi network. The mobile device 50 does notcurrently belong to a wireless network.

In this situation, upon receiving NFC information from the mobile device50 by using the NFC I/F 22, the MFP 10 determines NO in S4 or S6, anddetermines NO in S10 and S12, as in the fourth situation.

The MFP 10 sends the WFD connection start information to the mobiledevice 50 by using the wireless LAN I/F 20 (S54). Next, the MFP 10executes the Search process of S55, searching for the mobile device 50.Upon finding the mobile device 50 (YES in S56), the MFP 10 determineswhether the found mobile device 50 is in the device state (S57). In thecase of determining that the mobile device 50 is in the device state(YES in S57), the G/O negotiation (S58) and the WPS negotiation (S62)are executed by using the wireless LAN I/F 20. Thereby, the WFD networkis constructed to which the MFP 10 and the mobile device 50 belong.

Next, the mobile device 50 sends print data to the MFP 10. The MFP 10receives the print data by using the wireless LAN I/F 20 (S20). Uponreceiving the print data, the MFP 10 causes the print executing unit 16to execute the print process.

(Ninth Situation)

In the ninth situation of FIG. 13 , the MFP 10 is set to the WFD=OFFmode. Moreover, the state of the MFP 10 is either a state of currentlybelonging or not currently belonging to the normal Wi-Fi network. Themobile device 50 does not currently belong to the wireless network.

In this situation, upon receiving NFC information from the mobile device50 by using the NFC I/F 22, the MFP 10 determines NO in S4 or S6, anddetermines NO in S8, as in the fifth situation. In this case, in S9 theMFP 10 changes from the WFD=OFF mode to the WFD=ON mode.

After changing from the WFD=OFF mode to the WFD=ON mode, the processesexecuted until the print process are the same as the processes executeduntil the print process in the eighth situation after NO was determinedin S10 and S12. When the print process ends, the MFP 10 determines thatan external device does not currently belong to the newly constructedWFD network (NO in S23), and changes from the WFD=ON mode to the WFD=OFFmode. According to this configuration, in the case where the externaldevice does not belong to the WFD network after the communication ofprint data, the mode can change appropriately from the WFD=ON mode tothe WFD=OFF mode.

According to this configuration, the MFP 10 can construct, with themobile device 50, the WFD network operating in either the G/O state orthe client state. Thereby, the MFP 10 can appropriately execute thecommunication of the print data with the mobile device 50.

(Corresponding Relationships)

The processes S15 to S18 and the processes S52 to S62 of FIG. 11 are anexample of the “specific process”.

Fourth Embodiment

Points differing from the first embodiment will be described. In thepresent embodiment, a communication process of FIG. 14 is executedinstead of the communication process of FIG. 2 . S2 to S24 of FIG. 14are the same as the processes S2 to S24 of FIG. 2 . In the case of NO inS8, i.e., in the case where the MFP 10 is not set to the WFD=ON mode, inS76 the determining unit 42 determines whether the MFP 10 currentlybelongs to the normal Wi-Fi network. In the case where informationindicating that the MFP 10 currently belongs to the normal Wi-Fi networkis being stored in the work area 38, the determining unit 42 determinesthat the MFP 10 currently belongs to the normal Wi-Fi network (YES inS76), and the process proceeds to S80. On the other hand, in the casewhere information indicating that the MFP 10 currently belongs to thenormal Wi-Fi network is not being stored in the work area 38, thedetermining unit 42 determines that the MFP 10 does not currently belongto the normal Wi-Fi network (NO in S76), and the process proceeds to S9.

In the case of YES in S10, i.e., in the case where the MFP 10 currentlybelongs to a WFD network and is operating in the client state in the WFDnetwork, in S72 the communication executing unit 44 sends the G/Owireless setting without including the password, that is being stored inthe work area 38 to the mobile device 50 via the NFC I/F 22, and theprocess proceeds to S20.

Upon receiving the G/O wireless setting, the mobile device 50 causes theuser to specify a password. When a password has been specified by theuser, the mobile device 50 establishes the connection with the G/O statedevice by using the wireless setting received from the MFP 10 and thepassword specified by the user. Thereby, the mobile device 50 becomescapable of wireless communication with the MFP 10 via the G/O statedevice. Moreover, in the case where the connection cannot be establishedbetween the mobile device 50 and the G/O state device, the MFP 10 cannotexecute wireless communication with the mobile device 50. In this case,the control unit 30 returns to S2 without executing the processes S20 toS24.

In the case of YES in S12, i.e., in the case where the MFP 10 currentlybelongs to a WFD network and is operating in the G/O state in the WFDnetwork, the process proceeds to S13. In S16 the communication executingunit 44 sends the wireless setting of the MFP 10 stored in the work area38 to the mobile device 50 via the NFC I/F 22, and the process proceedsto S18. The wireless setting of the MFP 10 sent in S16 includes thepassword.

Further, in the case where NO is determined in S12, i.e., in the casewhere the MFP 10 is operating in the device state, the determining unit42 executes the process S78. The process S78 is the same as the processS76. In the case of NO in S78, the process proceeds to S15, and in thecase of YES in S78, the process proceeds to S80.

In S80, the communication executing unit 44 sends the wireless settingnot including the password, for belonging to the normal Wi-Fi networkthat is being stored in the work area 38, i.e., the wireless setting ofthe AP (e.g., the AP 6) to the mobile device 50 via the NFC I/F 22, andthe process proceeds to S20. Upon receiving the AP wireless setting, asin the case of S72, the mobile device 50 establishes a connection withthe AP by using the wireless setting received from the MFP 10 and thepassword specified by the user. Thereby, the mobile device 50 becomescapable of wireless communication with the MFP 10 via the AP. Moreover,in the case where a connection cannot be established between the mobiledevice 50 and the AP, the MFP 10 cannot execute wireless communicationwith the mobile device 50. In this case, the control unit 30 returns toS2 without executing the processes S20 to S24.

Advantages of Present Embodiment

The MFP 10 of the fourth embodiment can achieve the same advantages asthe MFP 10 of the first embodiment in the first, second, fourth andfifth situations. The advantages of the present embodiment in tenth andeleventh situations will be described with reference to FIGS. 15, 16 .Moreover, processes corresponding to the communication process of FIG.14 are shown in each of FIGS. 15, 16 .

(Tenth Situation)

In the tenth situation shown in FIG. 15 , the MFP 10 currently belongsto the WFD network. The MFP 10 is operating in the client state in theWFD network. The PC 8 that is in the G/O state currently belongs to theWFD network, but the mobile device 50 does not currently belong to theWFD network. The mobile device 50 is in the same state as in the secondsituation.

In this situation, upon receiving NFC information from the mobile device50 by using the NFC I/F 22, the MFP 10 determines NO in S6 anddetermines YES in S10, as in the third situation. In S72, the MFP 10sends the IP address of the MFP 10 and the wireless setting notincluding the password, of the PC 8 that is operating in the G/O stateto the mobile device 50 via the NFC I/F 22. According to thisconfiguration, a password does not need to be provided to the mobiledevice 50 and the user. Consequently, in the case where the mobiledevice 50 and the user do not know the password for belonging to the WFDnetwork in which the PC 8 is operating in the G/O state, it is possibleto prevent the mobile device 50 from entering the WFD network.

Upon receiving the wireless setting, the mobile device 50 stores thereceived wireless setting in the work area 58. Next, the mobile device50 displays a password specifying screen on a displaying unit of themobile device 50. The user can specify the password by operating thecontrol unit of the mobile device 50. When the password is specified bythe user, the mobile device 50 establishes the WFD connection with thePC 8. Thereby, the mobile device 50 can belong to the WFD network towhich the MFP 10 currently belongs. The mobile device 50 operates in theclient state in the WFD network.

Moreover, in a modification, the wireless setting used previously tobelong to the network may be stored by the mobile device 50 in thememory of the mobile device 50. In this case, upon receiving thewireless setting that does not include the password, the mobile device50 may identify, from the memory of the mobile device 50, the wirelesssetting that includes the same SSID as the SSID included in the receivedwireless setting. The mobile device 50 may establish the WFD connectionwith the PC 8 by using the wireless setting identified from the memoryof the mobile device 50.

Upon belonging to the WFD network, the mobile device 50 sends print datato the MFP 10 by executing wireless communication via the PC 8 by usingthe wireless setting stored in the work area 58 and the IP address ofthe MFP 10 received in S72. The MFP 10 receives the print data from thePC 8 by using the wireless LAN I/F 20 (S20) and, upon receiving theprint data, causes the print executing unit 16 to execute the printprocess.

According to this configuration, in the case where the MFP 10 does notbelong to the same network as the mobile device 50, the MFP 10 canappropriately execute the communication of print data with the mobiledevice 50 via the WFD network to which the MFP 10 currently belongs.

(Eleventh Situation)

In the eleventh situation shown in FIG. 16 , the MFP 10 currentlybelongs to a normal Wi-Fi network. The MFP 10 is connected with the AP 6in the normal Wi-Fi network. The mobile device 50 is in the same stateas in the second situation.

In this situation, upon receiving NFC information from the mobile device50 by using the NFC I/F 22, in S6 the MFP 10 determines that the mobiledevice 50 does not currently belong to the normal Wi-Fi network to whichthe MFP 10 currently belongs (NO in S6). Further, in S8 the MFP 10determines that it is set to WFD=OFF mode (NO in S8). Next, in S76 theMFP 10 determines that it currently belongs to the normal Wi-Fi network(YES in S76). In this case, in S80 the MFP 10 sends, to the mobiledevice 50, the IP address of the MFP 10 and the wireless setting of theAP 6 not including the password, which is stored in the work area 38.According to this configuration, the password does not need to beprovided to the mobile device 50 and the user. Consequently, in the casewhere the mobile device 50 and the user do not know the password forbelonging to the normal Wi-Fi network in which the AP 6 is used, it ispossible to prevent the mobile device 50 from entering the normal Wi-Finetwork.

When the wireless setting is received, as in the tenth situation, themobile device 50 receives the wireless setting and causes the user tospecify the password. Next, when the password is specified by the user,the mobile device 50 establishes a normal Wi-Fi connection with the AP6. Thereby, the mobile device 50 can belong to the normal Wi-Fi networkto which the MFP 10 currently belongs. The mobile device 50 can send theprint data to the MFP 10 via the AP 6. Upon belonging to the normalWi-Fi network, the mobile device 50 executes the wireless communicationvia the AP 6 by using the wireless setting stored in the work area 58and the IP address of the MFP 10 received in S80, thereby sending theprint data to the MFP 10.

Moreover, although not shown, in the case where the MFP 10 is currentlyoperating in the device state (YES in S8, NO in S10 and S12) and the MFP10 belongs to the normal Wi-Fi network (YES in S78), as well, the MFP 10sends, to the mobile device 50, the AP wireless setting not includingthe password, that is being stored in the work area 38.

According to this configuration, in the case where the MFP 10 does notbelong to the same network as the mobile device 50, the MFP 10 canappropriately execute the communication of the print data with themobile device 50 via the normal Wi-Fi network to which the MFP 10currently belongs.

(Corresponding Relationships)

The processes S15 to S18, the process S72, the processes S7 to S18, andthe process S80 of FIG. 14 are an example of the “specific process”. Inthe case where YES is determined in S4 of FIG. 14 , the WFD network andthe normal Wi-Fi network to which the MFP 10 belongs are an example ofthe “first wireless network”.

Fifth Embodiment

Points differing from the first embodiment will be described. In thepresent embodiment, in the case where the mobile device 50 currentlybelongs to a network, the mobile device 50 sends, to the MFP 10, NFCinformation further including the password, authentication method andencryption method as the wireless setting stored in the work area 58.

Further, in the present embodiment, a communication process of FIG. 17is executed instead of the communication process of FIG. 2 . S2 to S24of FIG. 17 are the same as the processes S2 to S24 of FIG. 2 . In thecase of NO in S4 (i.e., in the case where the MFP 10 does not currentlybelong to a network), or in the case of NO in S6 (i.e., in the casewhere the MFP 10 and the mobile device 50 do not belong to the samenetwork), in S82 the determining unit 42 determines whether the wirelesssetting is included in the NFC information received from the mobiledevice 50 by using the NFC I/F 22. In the case where it is determinedthat the wireless setting is included (YES in S82), in S83 theinformation indicating setting change is unnecessary is sent to themobile device 50 by using the NFC I/F 22. Next, in S84, by using thewireless setting included in the NFC information, the communicationexecuting unit 44 joins the network to which the mobile device 50belongs, and the process proceeds to S20.

On the other hand, in the case where it is determined that the wirelesssetting is not included in the NFC information (NO in S82), the processproceeds to S8.

Advantages of Present Embodiment

The MFP 10 of the fifth embodiment can achieve the same advantages asthe MFP 10 of the first embodiment in the first to fifth situations. Theadvantages of the present embodiment in a twelfth situation will bedescribed with reference to FIG. 18 . Moreover, processes correspondingto the communication process of FIG. 17 are shown in FIG. 18 .

(Twelfth Situation)

In the twelfth situation shown in FIG. 18 , the MFP 10 does notcurrently belong to a network, or currently belongs to a network towhich the mobile device 50 does not belong. On the other hand, themobile device 50 currently belongs to a normal Wi-Fi network to whichthe AP 6 belongs.

In this situation, upon receiving NFC information from the mobile device50 via the NFC I/F 22, the MFP 10 determines that the MFP 10 and themobile device 50 do not currently belong to the same network (NO in S4or NO in S6). Next, in S82 the MFP 10 determines that the wirelesssetting for belonging to the network to which the mobile device 50currently belongs is included in the NFC information (YES in S82).

Next, in S83 the MFP 10 sends the information indicating setting changeis unnecessary to the mobile device 50 by using the NFC I/F 22.Moreover, in the case of NO in S4 (i.e., the case where the MFP 10 doesnot currently belong to a network), the MFP 10 sends informationindicating setting change is unnecessary including the MAC address ofthe MFP 10 to the mobile device 50. Further, in the case of NO in S6(i.e., the case where the MFP 10 currently belongs to a network, but theMFP 10 and the mobile device 50 do not belong to the same network), theMFP 10 sends information indicating setting change is unnecessaryincluding the IP address of the MFP 10 to the mobile device 50.

The MFP 10 establishes a normal Wi-Fi connection with the AP 6 by usingthe wireless setting included in the NFC information (S84). In the casewhere the IP address of the MFP 10 is included in the informationindicating setting change is unnecessary, the mobile device 50 specifiesthat IP address in the destination, and sends print data to the MFP 10via the AP 6 (S20). Further, in the case where the MAC address of theMFP 10 is included in the information indicating setting change isunnecessary, the mobile device 50 identifies the IP address of the MFP10 in accordance with RARP (abbreviation of: Reverse Address ResolutionProtocol), specifies the identified IP address in the destination, andsends print data to the MFP 10 via the AP 6 (S20).

According to this configuration, in the case where the MFP 10 and themobile device 50 do not belong to the same network, the MFP 10 canappropriately execute the communication of print data with the mobiledevice 50 via the network to which the mobile device 50 currentlybelongs.

(Corresponding Relationships)

The processes S15 to S18 and the processes S83, S84 of FIG. 17 are anexample of the “specific process”. In the case where YES is determinedin S82 of FIG. 17 , the network to which the mobile device 50 belongs isan example of the “third wireless network”.

Sixth Embodiment

Points differing from the fourth embodiment will be described. In thepresent embodiment, a communication process of FIG. 19 is executedinstead of the communication process of FIG. 14 . In the communicationprocess of FIG. 19 , in the case where YES is determined in S10, aprocess the same as S14 of FIG. 2 is executed without the process S72 ofFIG. 14 being executed.

According to this configuration, the same advantages as in the thirdsituation can be achieved.

Seventh Embodiment

Points differing from the first embodiment will be described. The MFP 10of the present embodiment comprises a wired LAN I/F (not shown) inaddition to the I/Fs 20, 22. In the present embodiment, a communicationprocess of FIG. 20 is executed instead of the communication process ofFIG. 2 . S2, S8 to S24 of FIG. 20 are the same as the processes of S2,S8 to S24 of FIG. 2 .

As shown in FIG. 20 , when NFC information is received by using the NFCI/F 22 (YES in S2), in S94 the determining unit 42 determines whetherthe MFP 10 currently belongs to a wired network that uses the wired LANI/F and, further, whether the MFP 10 currently belongs to the wirelessnetwork that uses the wireless LAN I/F 20. Specifically, in the casewhere the MFP 10 currently belongs to the wired network by using thewired LAN I/F, information indicating that the MFP 10 currently belongsto the wired network is stored in the work area 38 of the memory 34. Inthe case where the information indicating that the MFP 10 currentlybelongs to the wired network is being stored in the work area 38, thedetermining unit 42 determines that the MFP 10 currently belongs to awired network (YES in S94). Further, in the case where the informationindicating that the MFP 10 currently belongs to the wired network is notbeing stored in the work area 38, the determining unit 42 determinesthat the MFP 10 does not currently belong to the wired network (NO inS94). The determination as to whether the MFP 10 currently belongs tothe wireless network is the same as in the first embodiment.

If it is determined in S94 that the MFP 10 currently belongs to thewired network or the wireless network, or to both networks (YES in S94),the process proceeds to S96. If it is determined in S94 that the MFP 10does not belong to either the wired network or the wireless network (NOin S94), the process proceeds to S8.

In S96 the control unit 30 determines whether the MFP 10 is in a stateof being capable of executing the communication of the object data withthe mobile device 50 via the network to which the MFP 10 currentlybelongs (either the wired network or the wireless network).Specifically, this will be described according to a thirteenth situationof FIG. 21 .

FIG. 21 shows an example in which the MFP 10 is connected with the AP 6via the wired LAN, and the mobile device 50 is connected with the AP 6via the normal Wi-Fi network.

Moreover, in the sequence view of FIG. 21 , communication using thewired LAN I/F is represented by arrows. The arrows representingcommunication using the wired LAN I/F are fatter than the arrowsrepresenting wireless communication using the wireless LAN I/F 20.

The MFP 10 receives NFC information from the mobile device 50. The NFCinformation sent from the mobile device 50 includes the device ID andthe IP address of the mobile device 50. In S96 the determining unit 42determines whether the MFP 10 is capable of communicating with themobile device 50 via the network to which the MFP 10 currently belongs(the wired LAN in the example of FIG. 21 ). Specifically, thedetermining unit 42 unicasts a device ID inquiry by using the wired LANI/F. The determining unit 42 specifies the IP address included in theNFC information as the destination of the inquiry, and sends theinquiry.

Upon receiving the inquiry via the AP 6, the mobile device 50 sends thedevice ID of the mobile device 50 to the MFP 10 that is the source ofthe inquiry. Upon receiving the device ID of the mobile device 50 viathe AP 6, by using the wired LAN I/F, the determining unit 42 determineswhether the received device ID and the device ID included in the NFCinformation are identical. In the case where the two device IDs areidentical, the determining unit 42 determines YES in S96, and proceedsto S7. On the other hand, in the case where there is no response to theinquiry or the two device IDs are not identical, the determining unit 42determines NO in S96, and proceeds to S8.

According to this configuration, in the case where the current state ofthe MFP 10 is a state capable of communicating with the mobile device50, the MFP 10 can execute the communication of object data with themobile device 50 by using the wired LAN I/F.

In the first embodiment, it is determined in S6 whether the MFP 10 andthe mobile device 50 are present in the same network. By contrast, inthe present embodiment, in S96 it is determined whether the MFP 10 andthe mobile device 50 are capable of communication regardless of whetherthe MFP 10 and the mobile device 50 are present in the same network.

(Corresponding Relationships)

The wireless LAN I/F and wired LAN I/F are an example of the “secondtype of interface”. The wired LAN is an example of the “first wirelessnetwork”. The device ID included in the NFC information is an example ofthe “terminal identification information”.

(Modifications)

(1) The “communication device” is not restricted to the multi-functionperipheral, but may be another apparatus comprising the first type ofinterface and the second type of interface (e.g., printer, FAX device,copier, scanner, etc.).

(2) The MFP 10 may store an AP program for functioning as an accesspoint. Upon activation of the AP program, the control unit 30 may storea predetermined wireless setting in the work area 38. For example, inS15 of FIG. 2 , the communication executing unit 44 may activate the APprogram instead of setting the MFP 10 to spontaneous G/O mode. Next, thecommunication executing unit 44 may send the wireless setting that hasbeen pre-stored in the work area 38 to the mobile device 50. Thereupon,the communication executing unit 44 and the mobile device 50 mayestablish a connection by using the wireless setting pre-stored in thework area 38. In this case, the MFP 10 may establish a normal Wi-Ficonnection with the mobile device 50 and, further, the MFP 10 mayconstruct a normal Wi-Fi network. In the present modification, thenormal Wi-Fi which the MFP 10 executes with the mobile device 50 byactivating the AP program and functioning as the access point is anexample of the “specific wireless communication”. Further, theactivation of the AP program, sending of the wireless setting, andestablishment of the normal Wi-Fi connection is an example of the“specific process”.

(3) The combination of the “first type of interface” and the “secondtype of interface” is not restricted to the combination of the NFC I/Fand the wireless LAN I/F. For example, in the case where the wirelessLAN I/F is adopted as the “second type of interface”, the “first type ofinterface” may be an interface for executing infrared communication, aninterface for executing Bluetooth (registered trademark), or aninterface for executing Transfer Jet. Further, in the case where the NFCI/F is adopted as the “first type of interface”, the “second type ofinterface” may be an interface for executing wired communication, or aninterface for executing Bluetooth (registered trademark). In generalterms, the combination of the interfaces may be any combination wherebythe communication speed of communication via the second type ofinterface is faster than the communication speed of communication viathe first type of interface.

(4) The “first type of interface” and the “second type of interface” mayphysically be two interfaces (i.e., two separate IC chips), as in theabove embodiments, or may physically be one interface (i.e., two typesof communication are realized with one IC chip).

(5) In the above embodiments, the interface for executing wirelesscommunication according to the WFD system and the interface forexecuting wireless communication according to normal Wi-Fi wasphysically one interface (the wireless LAN I/F 20). However, it mayphysically be a plurality of interfaces (i.e., two separate IC chips).In the present modification, the plurality of interfaces is an exampleof the “second type of interface”.

(6) In the first, second, and fourth to seventh embodiments, in S15 thecommunication executing unit 44 sets the MFP 10 to spontaneous G/O mode.However, in the case where the mobile device 50 is capable of executingwireless communication according to the WFD system, the communicationexecuting unit 44 may execute the processes S54 to S62 of FIG. 11instead of S15 to S18. In the present modification, the processes S54 toS62 are an example of the “specific process”.

(7) In the seventh embodiment, the determining unit 42 specifies the IPaddress included in the NFC information (i.e., the IP address of themobile device 50) in the destination, and sends the device ID inquiry.However, the determining unit 42 may broadcast the device ID inquiry viathe network to which the MFP 10 currently belongs (the wired network orthe wireless network). In this case, the device ID inquiry may includethe device ID included in the NFC information. When the broadcastinquiry has been received, in the case where the device ID included inthe inquiry is the device ID of the mobile device 50, the mobile device50 may send a response to the inquiry to the MFP 10 that is the sourceof the inquiry. The MFP 10 may receive the response to the inquiry viathe network to which the MFP 10 currently belongs. In the case where theresponse is received, the determining unit 42 may determine that thecurrent state of the MFP 10 is the state of being capable ofcommunication with the mobile device 50 (YES in S6 of FIG. 2 ).According to the present modification, YES can be determined in S6 ofFIG. 2 in the case where the MFP 10 and the mobile device 50 are in thesame subnet. In the present modification, the determination of S6 is anexample of the MFP 10 determining whether the “mobile device currentlybelongs to the specific network to which the communication devicecurrently belongs”.

(8) In the above embodiments, the units 40 to 46 are realized bysoftware. However, one or more of the units 40 to 46 may be realized byhardware such as a logic circuit, etc.

1. A printer comprising: a first interface; a second interface differentfrom the first interface; a processor; and a memory that storescomputer-readable instructions therein, the computer-readableinstructions, when executed by the processor, cause the printer toperform: in a situation where the printer operates as a parent stationof a first network: sending, to a communication device via the firstinterface, setting information for the communication device to belong tothe first network; establishing a wireless connection with thecommunication device via the second interface by using the settinginformation; receiving first print data from the communication device byusing the established connection via the second interface; and executinga print process using the received first print data, and in a situationwhere the printer belongs to a second network to which the communicationdevice currently belongs: sending, to the communication device via thefirst interface, information different from the setting information;receiving second print data from the communication device via an accesspoint by using the second interface; and executing the print processusing the received second print data.
 2. The printer as in claim 1,wherein the first interface is a NFC interface, and the second interfaceis a Wi-Fi interface.
 3. The printer as in claim 1, wherein the firstinterface is a Bluetooth interface, and the second interface is a Wi-Fiinterface.
 4. The printer as in claim 1, wherein the setting informationincludes identification information for identifying the first network.5. The printer as in claim 4, wherein the identification information isa Service Set Identifier (SSID).
 6. The printer as in claim 1, whereinthe information being different from the setting information indicatesthat setting change of the communication device is unnecessary and thecommunication of data can be executed.
 7. A non-transitorycomputer-readable medium storing computer-readable instructions for aprinter, wherein the printer comprises a processor, a first interface,and a second interface different from the first interface, wherein thecomputer-readable instructions, when executed by the processor, causethe printer to perform: in a situation where the printer operates as aparent station of a first network: sending, to a communication devicevia the first interface, setting information for the communicationdevice to belong to the first network; establishing a wirelessconnection with the communication device via the second interface byusing the setting information; receiving first print data from thecommunication device by using the established connection via the secondinterface; and executing a print process using the received first printdata, and in a situation where the printer belongs to a second networkto which the communication device currently belongs: sending, to thecommunication device via the first interface, information different fromthe setting information; receiving second print data from thecommunication device not via an access point by using the secondinterface; and executing the print process using the received secondprint data.
 8. The printer as in claim 7, wherein the first interface isa NFC interface, and the second interface is a Wi-Fi interface.
 9. Theprinter as in claim 7, wherein the first interface is a Bluetoothinterface, and the second interface is a Wi-Fi interface.
 10. Theprinter as in claim 7, wherein the setting information includesidentification information for identifying the first network.
 11. Theprinter as in claim 10, wherein the identification information is aService Set Identifier (SSID).
 12. The printer as in claim 7, whereinthe information being different from the setting information indicatesthat setting change of the communication device is unnecessary and thecommunication of data can be executed.